package org.hope.spring.bean.replacedmethod;

import org.hope.spring.bean.model.Player;
import org.springframework.beans.factory.support.MethodReplacer;

import java.lang.reflect.Method;

/**
 *   
 *  @ProjectName: spring-bean 
 *  @Description: 用于替换他人的bean，必须实现MethodReplacer
 *  @author: lisen
 *  @date: 2017/12/17  
 */
public class Yao implements MethodReplacer {
    public Object reimplement(Object obj, Method method, Object[] args) throws Throwable {
        Player player = new Player();
        player.setName("姚明");
        return player;
    }
}
